﻿using System;

namespace HossMvp.Core
{
    public interface ICommandProcessor
    {
        ICommand RegisterCommand(string name, Action<CommandContext> execute, Func<bool> canExecute);

        ICommand RegisterCommand(string name, Action<CommandContext> execute, Func<bool> canExecute, Func<bool> preExecute);

        void UnregisterCommand(string name);

        ICommand GetCommand(string name);

        void Enable();  // sets enabled/disabled on all changed commands

        NameDecorator Decorator { get; }
    }
}